APP_NAME=aliyun

SRC_PATH=$(shell pwd)

CC?=gcc
CFLAGS=-I ${SRC_PATH}/../include -I ${SRC_PATH}/../install/include
LDFLAGS+=-L ${SRC_PATH}/../install/lib
LDFLAGS+=-lmosquitto -lcjson -liniparser -lpthread -lsqlite3 -lzlog

all:
	${CC} ${CFLAGS} *.c -o ${APP_NAME} ${LDFLAGS}

clean:
	rm -f ../log/*

distclean: clean
	rm -f ${APP_NAME}

run:
	export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SRC_PATH}/../include/lib && ./${APP_NAME}
	
